import request from '@/utils/request'

// 查询报查询sql列表
export function listSql(query) {
  return request({
    url: '/basic/sql/list',
    method: 'get',
    params: query
  })
}

// 查询报查询sql详细
export function getSql(id) {
  return request({
    url: '/basic/sql/' + id,
    method: 'get'
  })
}

// 新增报查询sql
export function addSql(data) {
  return request({
    url: '/basic/sql',
    method: 'post',
    data: data
  })
}

// 修改报查询sql
export function updateSql(data) {
  return request({
    url: '/basic/sql',
    method: 'put',
    data: data
  })
}

// 删除报查询sql
export function delSql(id) {
  return request({
    url: '/basic/sql/' + id,
    method: 'delete'
  })
}

// 导出报查询sql
export function exportSql(query) {
  return request({
    url: '/basic/sql/export',
    method: 'get',
    params: query
  })
}